<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ include file="/view/common/init.jsp"%>
<title>Chi tiết mẫu đo</title>
<center>
<div class="header">CHI TIẾT MẪU ĐO</div>
<div style="width: 980px;">
<div style="width: 100%;margin-bottom: 10px;">
	<button type="button" onclick="location.href='<c:out value="${pageContext.request.contextPath}"/>/agent/list.do'" style="float: right;">Trở lại</button>
	<div class="clear-right"><span></span></div>
</div>  
<s:form action="detailExam.do" method="get">
<input type="hidden" name="agent.msisdn" value="<c:out value="${agent.msisdn}"/>">
<c:if test='${end != "0"}'>
		<div style="width: 100%;margin-bottom: 10px;text-align: right;">
			<c:choose>  
				<c:when test='${start != end}'>  
					Bản ghi thứ <c:out value="${start}"/> đến <c:out value="${end}"/>&nbsp;
				</c:when>  
				<c:otherwise>  
					Bản ghi thứ <c:out value="${start}"/>&nbsp;
				</c:otherwise> 
			</c:choose>	 
			trong tổng số <c:out value="${total}"/> bản ghi &nbsp;&nbsp;&nbsp;
			<c:if test='${page != "1"}'> 
				<input type="image" onclick="$('page').value=parseInt($('page').value)-1;return true;" src="<c:out value="${pageContext.request.contextPath}"/>/image/first.png">&nbsp;&nbsp;
			</c:if>
			<c:if test='${pageNum != 1}'>
				<input id="page" readonly="readonly" type="text" name="page" style="width: 30px;text-align: center;" value="<c:out value="${page}"/>">&nbsp;&nbsp;
			</c:if>			<c:if test='${page != pageNum}'> 
				<input type="image" onclick="$('page').value=parseInt($('page').value)+1;return true;"  src="<c:out value="${pageContext.request.contextPath}"/>/image/last.png">
			</c:if>
		</div>
</c:if>		
</s:form>
<table class="tbl_info" border="0" width="613" style="z-index: -1;">
	<tbody>
		<tr>
			<td class="hed" rowspan="2" style="height: 78px;">STT</td>
			<td class="hed" rowspan="2" style="height: 78px;">MSISDN</td> 
			<td class="hed" rowspan="2">IMEI</td>
			<td class="hed" rowspan="2">MCC</td>
			<td class="hed" rowspan="2">MNC</td>
			<td class="hed" rowspan="2">LAC</td>
			<td class="hed" rowspan="2">CELL ID</td>
			<td class="hed" rowspan="2">BA Used</td>
			<td class="hed" rowspan="2">DTX Used</td>
			<td class="hed" rowspan="2">Timing advance</td>
			<td class="hed" rowspan="2">RX All</td>
			<td class="hed" rowspan="2">RX Sub</td>
			<td class="hed" rowspan="2">RX Quantity All</td>
			<td class="hed" rowspan="2">RX Quantity Sub</td>
			<td class="hed" rowspan="${end - start + 4}" valign="top" style="border-right: none;">
				<div style="overflow-x: scroll;width: 200px;padding: 0px;margin: 0px;">
					<table class="tbl_info" style="margin: 0px;z-index: 100;">
					<tbody>
					<tr>
						<td style="height: 37px;" class="hed"  nowrap="nowrap" colspan="4">1st Cell Information</td>
						<td class="hed"  nowrap="nowrap" colspan="4">2nd Cell Information</td>
						<td class="hed"  nowrap="nowrap" colspan="4">3rd Cell Information</td>
						<td class="hed"  nowrap="nowrap" colspan="4">4th Cell Information</td>
						<td class="hed"  nowrap="nowrap" colspan="4">5th Cell Information</td>
						<td class="hed"  nowrap="nowrap" colspan="4">6th Cell Information</td>						
					</tr>
					<tr>
						<td style="height: 36px;" class="hed"  nowrap="nowrap">RX</td>
						<td class="hed"  nowrap="nowrap">BCCH</td>
						<td class="hed"  nowrap="nowrap">NCC Bsic</td>
						<td class="hed"  nowrap="nowrap">BCC Bsic</td>
						<td class="hed"  nowrap="nowrap">RX</td>
						<td class="hed"  nowrap="nowrap">BCCH</td>
						<td class="hed"  nowrap="nowrap">NCC Bsic</td>
						<td class="hed"  nowrap="nowrap">BCC Bsic</td>
						<td class="hed"  nowrap="nowrap">RX</td>
						<td class="hed"  nowrap="nowrap">BCCH</td>
						<td class="hed"  nowrap="nowrap">NCC Bsic</td>
						<td class="hed"  nowrap="nowrap">BCC Bsic</td>
						<td class="hed"  nowrap="nowrap">RX</td>
						<td class="hed"  nowrap="nowrap">BCCH</td>
						<td class="hed"  nowrap="nowrap">NCC Bsic</td>
						<td class="hed"  nowrap="nowrap">BCC Bsic</td>
						<td class="hed"  nowrap="nowrap">RX</td>
						<td class="hed"  nowrap="nowrap">BCCH</td>
						<td class="hed"  nowrap="nowrap">NCC Bsic</td>
						<td class="hed"  nowrap="nowrap">BCC Bsic</td>
						<td class="hed"  nowrap="nowrap">RX</td>
						<td class="hed"  nowrap="nowrap">BCCH</td>
						<td class="hed"  nowrap="nowrap">NCC Bsic</td>
						<td class="hed"  nowrap="nowrap">BCC Bsic</td>
					</tr>
					<tr></tr>
				<c:forEach var="niData" items="${niDatas}" varStatus="rowCounter">
					<tr>
						<td nowrap="nowrap">${niData.rx1}</td>
						<td>${niData.bcch1}</td>
						<td>${niData.nccBsic1}</td>
						<td>${niData.bccBsic1}</td>
						<td nowrap="nowrap">${niData.rx2}</td>
						<td>${niData.bcch2}</td>
						<td>${niData.nccBsic2}</td>
						<td>${niData.bccBsic2}</td>
						<td nowrap="nowrap">${niData.rx3}</td>
						<td>${niData.bcch3}</td>
						<td>${niData.nccBsic3}</td>
						<td>${niData.bccBsic3}</td>
						<td nowrap="nowrap">${niData.rx4}</td>
						<td>${niData.bcch4}</td>
						<td>${niData.nccBsic4}</td>
						<td>${niData.bccBsic4}</td>
						<td nowrap="nowrap">${niData.rx5}</td>
						<td>${niData.bcch5}</td>
						<td>${niData.nccBsic5}</td>
						<td>${niData.bccBsic5}</td>
						<td nowrap="nowrap">${niData.rx6}</td>
						<td>${niData.bcch6}</td>
						<td>${niData.nccBsic6}</td>
						<td>${niData.bccBsic6}</td>
					</tr>
					
				</c:forEach>					
					</tbody>															
				</table>
				</div>
			</td>
			<td class="hed"  nowrap="nowrap" rowspan="2" style="border-left: 2px solid #FFFFFF;">Time Collected</td>
		</tr>
		<tr></tr>
<c:forEach var="niData" items="${niDatas}" varStatus="rowCounter">
	<tr>
		<td>${niData.index}</td>
		<td>${niData.msisdn}</td>
		<td>${niData.imei}</td>
		<td>${niData.mcc}</td>
		<td>${niData.mnc}</td>
		<td>${niData.lac}</td>
		<td>${niData.cellId}</td>
		<td>${niData.baUsed}</td>
		<td>${niData.dtxUsed}</td>
		<td>${niData.timingAdvance}</td>
		<td nowrap="nowrap">${niData.rxAll}</td>
		<td nowrap="nowrap">${niData.rxSub}</td>
		<td>${niData.rxQualityAll}</td>
		<td>${niData.rxQualitySub}</td>
		<td nowrap="nowrap">${niData.timeCollected}</td>	
	</tr>
</c:forEach>
	<tr>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
		<td class="hed" style="border: none;" >&nbsp;</td>
	</tr>		
	</tbody>
</table>
</div>
</center>